/**
 * 
 */
package com.heo.queue.task;

import java.util.Date;

import com.heo.pub.ServerConfig;

/**
 * @author chichi
 * 重发时需要用到的控制信息
 */
public class ReSendInfo
{
  private int reSendCount = 0;// 当前重发次数
  private int maxReSendCount = 3;// 最大重发次数
  private long lastSendTime = 0;// 上次发送时间
  private long expireTime = 0;// 过期时间，超过这个时间则不发送
  
  public ReSendInfo()
  {
    maxReSendCount = ServerConfig.RESEND_MAX_COUNT;//初始化最大重发次数
    expireTime = new Date().getTime() + ServerConfig.RESEND_TIMEOUT;//初始化超时时间
  }

  public int getReSendCount()
  {
    return reSendCount;
  }

  public void setReSendCount(int reSendCount)
  {
    this.reSendCount = reSendCount;
  }

  public int getMaxReSendCount()
  {
    return maxReSendCount;
  }

  public void setMaxReSendCount(int maxReSendCount)
  {
    this.maxReSendCount = maxReSendCount;
  }

  public long getLastSendTime()
  {
    return lastSendTime;
  }

  public void setLastSendTime(long lastSendTime)
  {
    this.lastSendTime = lastSendTime;
  }

  public long getExpireTime()
  {
    return expireTime;
  }

  public void setExpireTime(long expireTime)
  {
    this.expireTime = expireTime;
  }
}
